<template>
    <view class="cu-form-group">
    	<view class="title">{{label}}</view>
    	<!-- <input class="tar" v-model="valueInside"  :placeholder="placeholder" name="input"></input> -->
		<textarea maxlength="-1"  v-model="valueInside"  @input="textareaBInput" :placeholder="placeholder"></textarea>
    </view>
</template>

<script>
    export default {
        name: "stextarea",
        props: {
            value: '',
			model:'',
			label:'',
			placeholder:{
				default:"请输入"
			}
        },
        data() {
            return {
                valueInside:''
            }
        },
        methods: {
           textareaBInput(e) {
           	this.valueInside = e.detail.value
           }
        },
        mounted() {
            this.valueInside = this.value
        },
		watch:{
			value(curVal,oldVal){
				this.valueInside = curVal
			},
			valueInside(curVal,oldVal){
				this.$emit('input',curVal)
			}
		}
    }
</script>

<style>
    .cu-form-group .title {
    	min-width: calc(4em + 15px);
    }
</style>
